<template>
	<view>
			<hx-navbar ref="hxnb" :config="config" />
			<view  class="flex flex-direction justify-center " style="padding: 30rpx;background-color: #FFFFFF;margin-top: 20rpx;">
				<view v-for="(item,index) in sessionData" :key="index" style="margin-top: 30rpx;" @tap="goIndex(item.id)">
					<view>
						<view style="color: #1E1E1E;font-size: 32rpx;font-weight:650;">{{item.projectName}}</view>
						<view style="color: rgba(30,30,30,0.3);font-size: 28rpx;margin-top: 10rpx;">{{item.createTime}}</view>
						<view style="width: 582rpx;height: 0rpx;border: 1rpx solid rgba(30,30,30,0.1);margin:15rpx auto ;"></view>
					</view>
					<view  class="flex justify-between align-center" style="margin-top: 28rpx;">
						<view class="flex align-center">
							<image src="../../static/cliend/8367.png" mode="aspectFit" style="width: 64rpx;height: 64rpx;"></image>
								<view style="color: #1E1E1E;font-size: 32rpx;">报价金额</view>
						</view>
						<view style="font-size: 44rpx;color: #1E1E1E;">{{item.estimateAmount}}</view>
					</view>
				</view>
			</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				config: {
					title: '我的报价',
					color: '#111111',
					backgroundColor: [1, '#FFFFFF'],
					border: true,
					// #ifdef H5
					backPage: '',
					// #endif
				},
				sessionId:'',
				sessionData:[]
			}
		},
		onLoad(e) {
			this.sessionId = e.data
			this.quotationList()
		},
		methods: {
			quotationList(){
				let data = {
					sessionId:this.sessionId
				}
				this.$api.quotationList(data).then((res) => {
					res.data.result.forEach((item)=>{
						item.createTime = this.$tools.fileTime(item.createTime)
					})
					this.sessionData = res.data.result
				})
			},
			goIndex(e){
				this.$tools.goPageNoAuth('/clientEnd/page/chat/budgetSheet?data='+e)
			}
		}
	}
</script>

<style>

</style>
